package com.lm.common.security.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lm.common.security.component.CustomOauth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

/**
 * access_denied
 *
 * @author
 * @date
 */
@JsonSerialize(using = CustomOauth2ExceptionSerializer.class)
public class ForbiddenException extends CustomOauth2Exception {

    public ForbiddenException(String msg, Throwable t) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "access_denied";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.FORBIDDEN.value();
    }

}